﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T19ShotBlock.Baseclass
{
    public class RandomHelper
    {
        public static Random globalRandomGenerator = GenerateNewRandomGenerator();

        public static Random GenerateNewRandomGenerator()
        {
            globalRandomGenerator = new Random((int)DateTime.Now.Ticks);
            return globalRandomGenerator;
        }
        public static  int GetRandomInt()
        {
            return globalRandomGenerator.Next(10);
        }
        public static int GetRandomInt(int max)
        {
            return globalRandomGenerator.Next(max);
        }
        public static int GetRandomInt(int min,int max)
        {
            return globalRandomGenerator.Next(max - min, max) + min;
        }
        public static double GetRandomInt(double min,double max)
        {
            return globalRandomGenerator.NextDouble() * (max - min) + min;
        }

    }
}
